import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.Map;

import com.speljohan.rsbot.bot.Bot;
import com.speljohan.rsbot.event.events.ServerMessageEvent;
import com.speljohan.rsbot.event.listeners.PaintListener;
import com.speljohan.rsbot.event.listeners.ServerMessageListener;
import com.speljohan.rsbot.script.Script;
import com.speljohan.rsbot.script.wrappers.RSArea;
import com.speljohan.rsbot.script.wrappers.RSObject;
import com.speljohan.rsbot.script.wrappers.RSTile;

/**
 * 
 * @Author Mouchicc < mourad94_4@hotmail.com >
 * 
 * @Date 2009
 * 
 * @param Updates
 *            - None yet
 * @version 1.0
 * 
 * @link http://www.rsbot.org/vb/showthread.php?t=57981
 * 
 */
public class MysticSummonerAIO extends Script implements ServerMessageListener,
		PaintListener {

	//interfaces = 669->15-> 0-15   Components
	//interfaces if Valis = 669->1       ||    669->14
	
	int item1;
	int item2;
	int whatScroll;
	public boolean summoningpouch = false;
	public boolean summoningscrolls = false;
	String process = "";
	public int Item2ID = 0000;

	String[] pouches = new String[] { "Abyssal lurker pouch:300:220:2",
			"Abyssal parasite pouch:300:80:2", "Abyssal titan pouch:300:220:4",
			"Adamant minotaur pouch:190:150:4", "Albino rat pouch:190:220:0",
			"Arctic bear pouch:300:80:3", "Barker toad pouch:190:290:2",
			"Beaver pouch:410:290:0", "Bloated leech pouch:80:80:2",
			"Bronze minotaur pouch:190:80:4", "Bull ant pouch:80:150:1",
			"Bunyip pouch:410:290:2", "Compost mound pouch:410:220:0",
			"Desert wyrm pouch:300:150:0", "Dreadfowl pouch:190:80:0",
			"Evil turnip pouch:300:150:1", "Fire titan pouch:300:220:3",
			"Forge regent pouch:410:150:3", "Fruit bat pouch:80:80:3",
			"Geyser titan pouch:80:220:4", "Giant chin pouch:80:290:0",
			"Giant ent pouch:190:220:3", "Granite crab pouch:80:150:0",
			"Granite lobster pouch:190:150:3", "Honey badger pouch:300:290:0",
			"Hydra pouch:190:290:3", "Ibis pouch:80:150:2",
			"Ice titan pouch:80:290:3", "Iron minotaur pouch:300:80:4",
			"Iron titan pouch:410:220:4",
			"Karamthulhu overlord pouch:80:220:2",
			"Lava titan pouch:410:290:3", "Macaw pouch:190:150:1",
			"Magpie pouch:410:290:1", "Mithril minotaur pouch:80:150:4",
			"Moss titan pouch:410:220:3", "Obsidian golem pouch:80:150:3",
			"Pack yak pouch:80:290:4", "Phoenix pouch:410:80:3",
			"Praying mantis pouch:300:150:3", "Pyre lord pouch:300:290:1",
			"Ravenous locust pouch:190:80:3", "Rune minotaur pouch:300:150:4",
			"Smoke devil pouch:190:220:2", "Spirit cobra pouch:410:220:2",
			"Spirit cockatrice pouch:410:150:1",
			"Spirit coraxatrice pouch:80:290:1",
			"Spirit dagannoth pouch:300:290:3",
			"Spirit graahk pouch:410:150:2",
			"Spirit guthatrice pouch:80:220:1", "Spirit jelly pouch:410:80:2",
			"Spirit kalphite pouch:300:220:0", "Spirit kyatt pouch:190:150:2",
			"Spirit larupia pouch:300:150:2",
			"Spirit mosquito pouch:190:150:0",
			"Spirit pengatrice pouch:410:220:1",
			"Spirit saratrice pouch:190:220:1",
			"Spirit scorpion pouch:410:150:0", "Spirit spider pouch:300:80:0",
			"Spirit terror bird pouch:190:80:2",
			"Spirit tz-kih pouch:80:220:0", "Spirit vulatrice pouch:190:290:1",
			"Spirit wolf pouch:80:80:0", "Spirit zamatrice pouch:300:220:1",
			"Steel minotaur pouch:410:80:4", "Steel titan pouch:190:290:4",
			"Stranger plant pouch:80:290:2", "Swamp titan pouch:80:80:4",
			"Talon beast pouch:80:220:3", "Thorny snail pouch:410:80:0",
			"Unicorn stallion pouch:410:150:4", "Vampire bat pouch:190:290:0",
			"Void ravanger pouch:80:80:1", "Void shifter pouch:410:80:1",
			"Void spinner pouch:190:80:1", "Void torcher pouch:300:80:1",
			"War tortoise pouch:300:290:2", "Wolpertinger pouch:190:220:4" };

	String[] scrolls = new String[] { "Abyssal drain scroll:300:80:2",
			"Abyssal stealth scroll:300:220:2",
			"Acorn missile scroll:190:220:3",
			"Adamant bull rush scroll:190:150:4", "Ambush scroll:190:150:2",
			"Arctic blast scroll:300:80:3", "Blood drain scroll:80:80:2",
			"Boil scroll:80:220:4", "Bronze bull rush scroll:190:80:4",
			"Call to arms scroll 1:80:80:1", "Call to arms scroll 2:190:80:1",
			"Call to arms scroll 3:300:80:1", "Call to arms scrol 4:410:80:1",
			"Cheese feast scroll:190:220:0", "Crushing claw scroll:80:150:0",
			"Deadly claw scroll:80:220:3", "Dissolve scroll:410:80:2",
			"Doomsphere scroll:80:220:2", "Dreadfowl strike scroll:190:80:0",
			"Dust cloud scroll:190:220:2", "Ebon thunder scroll:410:290:3",
			"Egg spawn scroll:300:80:0", "Electric lash scroll:300:150:0",
			"Essence shipment scroll:300:220:4",
			"Evil flames scroll:300:150:1", "Explode scroll:80:290:0",
			"Famine scroll:190:80:3", "Fireball assault scroll:80:220:0",
			"Fish rain scroll:80:150:2", "Fruitfall scroll:80:80:3",
			"Generate compost scroll:410:220:0", "Goad scroll:410:150:2",
			"Healing aura scroll:410:150:4", "Herbcall scroll:190:150:1",
			"Howl scroll:80:80:0", "Immense heat scroll:300:290:1",
			"Inferno scroll:410:150:3", "Insane ferocity scroll:300:290:0",
			"Iron bull rush scroll:300:80:4", "Iron within scroll:410:220:4",
			"Magic focus scroll:190:220:4", "Mantis strike scroll:300:150:3",
			"Mithril bull rush scroll:80:150:4", "Multichop scroll:410:290:0",
			"Ophidian incubation scroll:410:220:2", "Pester scroll:190:150:0",
			"Petrifying gaze scroll 1:410:150:1",
			"Petrifying gaze scroll 2:80:220:1",
			"Petrifying gaze scroll 3:190:220:1",
			"Petrifying gaze scroll 4:300:220:1",
			"Petrifying gaze scroll 5:410:220:1",
			"Petrifying gaze scroll 6:80:290:1",
			"Petrifying gaze scroll 7:190:290:1",
			"Poisonous blast scroll:80:290:2", "Regrowth scroll:190:290:3",
			"Rending scroll:300:150:2", "Rune bull rush scroll:300:150:4",
			"Sandstorm scroll:300:150:2", "Slime spray scroll:410:80:0",
			"Spike shot scroll:300:290:3", "Steel bull rush scroll:410:80:4",
			"Steel of legends scroll:190:290:4", "Stony shell scroll:80:150:0",
			"Swallow whole scroll:410:290:2", "Swamp plague scroll:80:80:4",
			"Testudo scroll:300:290:2", "Thieving fingers scroll:410:290:1",
			"Tireless run scroll:190:80:2",
			"Titan's constitution scroll(Fire):300:220:3",
			"Titan's constitution scroll(Ice):80:290:3",
			"Titan's constitution scroll(Moss):410:220:3",
			"Toad bark scroll:190:290:2", "Unburden scroll:80:150:1",
			"Vampire touch scroll:190:290:0", "Venom shot scroll:410:150:0",
			"Volcanic strength scroll", "Winter storage scroll" };

	// ***North-East and South-West Tiles***\\
	public RSTile northEastTeleSpot = new RSTile(2969, 3386);
	public RSTile southWestTeleSpot = new RSTile(2961, 3375);

	public RSTile northEastBank = new RSTile(2949, 3373);
	public RSTile southWestBank = new RSTile(2943, 3368);

	public RSTile northEastDoors = new RSTile(2940, 3452);
	public RSTile southWestDoors = new RSTile(2936, 3450);

	public RSTile northEastStore = new RSTile(2927, 3447);
	public RSTile southWestStore = new RSTile(2922, 3440);

	public RSTile[] openDoor = new RSTile[] { new RSTile(2935, 3450),
			new RSTile(2935, 3451) };

	// ***RSAreas***\\
	RSArea atTeleSpot = new RSArea(northEastTeleSpot, northEastTeleSpot);
	RSArea atBank = new RSArea(southWestBank, northEastBank);
	RSArea atDoors = new RSArea(southWestDoors, northEastDoors);
	RSArea atStore = new RSArea(northEastStore, northEastStore);

	public int IFace = 669;
	public int IFaceChild;
	public int[] shards = { 12183, 12530 };
	public int[] charms = { 12158, 12159, 12160, 12163 };
	public int[] gateClosed = { 28690, 28691 };
	public int[] gateOpened = { 28692, 28693 };
	public int booth = 11758;
	public int oblisk = 28716;
	public int ladderDown = 4039;
	public int ladderUp = 28714;
	public int randomInt = Math.round(random(0, 180));
	public int teleTab = 8009;
	BufferedImage UltimateSeries = null;
	int startLvl;
	int startExp;
	long startTime = System.currentTimeMillis();
	int skill = skills.getCurrentSkillLevel(STAT_SUMMONING);
	long lvls = 0;
	public int charm;
	public int pouch;
	public int[] allItems = new int[] { item1, 12225, 12226, 12227, 12228,
			12229, 12230, 12231, 12232, 12233, 12234, 12235, 12236, 12237,
			12238, 12239, 12240, 12241, 12242, 12243, 12244, 12245, 12246,
			12247, 12248, 12249, 12250, 12251, 12252, 12253, 12254, 12255,
			12256, 12257, 12258, 12259, 12260, 12261, 12262, 12263, 12264,
			12265, 12266, 12267, 12268, 12269, 12270, 12271, 12272, 12273,
			12274, 12275, 12276, 12277, 12278, 12279, 12280, 12281, 12282,
			12283, 12284, 12285, 12286, 12287, 12288, 12289, 12290, 12291,
			12292, 12293, 12294, 12295, 12296, 12297, 12298, 12299, 12300,
			12301, 12302, 12303, 12304, 12305, 12306, 12307, 12308, 12309,
			12310, 12311, 12312, 12313, 12314, 12315, 12316, 12317, 12318,
			12319, 12320, 12321, 12322, 12323, 12324, 12325, 12326, 12327,
			12328, 12329, 12330, 12331, 12332, 12333, 12334, 12335, 12336,
			12337, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345,
			12346, 12347, 12348, 12349, 12350, 12351, 12352, 12353, 12354,
			12355, 12356, 12357, 12358, 12359, 12360, 12361, 12362, 12363,
			12364, 12365, 12366, 12367, 12368, 12369, 12370, 12371, 12372,
			12373, 12374, 12375, 12376, 12377, 12378, 12379, 12380, 12381,
			12382, 12383, 12384, 12385, 12386, 12387, 12388, 12389, 12390,
			12392, 12393, 12394, 12395, 12396, 12397, 12398, 12399, 12400,
			12401, 12402, 12403, 12404, 12405, 12406, 12407, 12408, 12409,
			12410, 12411, 12412, 12413, 12414, 12415, 12416, 12417, 12418,
			12419, 12420, 12525 };

	public int x;
	public int y;

	RSTile[] toGate = new RSTile[] { new RSTile(2946, 3370),
			new RSTile(2950, 3376), new RSTile(2961, 3381),
			new RSTile(2960, 3398), new RSTile(2951, 3413),
			new RSTile(2948, 3430), new RSTile(2944, 3447),
			new RSTile(2937, 3451) };

	RSTile[] toStore = new RSTile[] { new RSTile(2934, 3450),
			new RSTile(2925, 3444) };

	RSTile[] fromTtab = new RSTile[] { new RSTile(2950, 3377),
			new RSTile(2945, 3370) };

	// Not real
	public RSTile[] toBank = new RSTile[] { new RSTile(2946, 3370),
			new RSTile(2950, 3376), new RSTile(2961, 3381),
			new RSTile(2960, 3398), new RSTile(2951, 3413),
			new RSTile(2948, 3430), new RSTile(2944, 3447),
			new RSTile(2937, 3451) };
	// Not real

	public RSTile shop = new RSTile(2925, 3444);
	public RSTile bankSpot = new RSTile(2946, 3370);
	public RSTile obeliskSpot = new RSTile(2209, 5347);
	public RSTile lGate = new RSTile(2934, 3450);
	public RSTile RGate = new RSTile(2937, 3451);

	@Override
	public String getName() {
		return "MysticSummonerAIO";
	}

	@Override
	public String getAuthor() {
		return "Mouchicc - Mystic Team";
	}

	@Override
	public String getScriptCategory() {
		return "Summoning";
	}

	@Override
	public double getVersion() {
		return 1.0;
	}

	@Override
	public String getScriptDescription() {
		String html = "";
		html += "<html>\n";
		html += "<body>\n";
		html += "<h1>";
		html += "<b><td>Summon Pouch/Scroll:</b></td><td width=\"140\"><center><select name=\"summonsort\"><option>Pouch<option>Scrolls</select></center></td><td width=\"135\"></b></center></td></tr>";
		html += "<b><td>Charm for Pouch/Scroll:</b></td><td width=\"140\"><center><select name=\"charmsort\"><option>Pouch<option>Scrolls</select></center></td><td width=\"135\"></b></center></td></tr>";
		html += "<td><b>2nd Item for Pouch/Scroll:</b></td><td colspan=\"3\"><center><b>2nd Item ID:</b>&nbsp<input type=\"text\" name=\"2ndItemID\" size=\"10\"></center></td>";
		html += "<b><td>Pouch:</b></td><td width=\"140\"><center><select name=\"pouch\"><option>Abyssal lurker pouch<option>Abyssal parasite pouch<option>Abyssal titan pouch<option>Adamant minotaur pouch<option>Albino rat pouch<option>Arctic bear pouch<option>Barker toad pouch<option>Beaver pouch<option>Bloated leech pouch<option>Bronze minotaur pouch<option>Bull ant pouch<option>Bunyip pouch<option>Compost mound pouch<option>Desert wyrm pouch<option>Dreadfowl pouch<option>Evil turnip pouch<option>Fire titan pouch<option>Forge regent pouch<option>Fruit bat pouch<option>Geyser titan pouch<option>Giant chin pouch<option>Giant ent pouch<option>Granite crab pouch<option>Granite lobster pouch<option>Honey badger pouch<option>Hydra pouch<option>Ibis pouch<option>Ice titan pouch<option>Iron minotaur pouch<option>Iron titan pouch<option>Karamthulhu overlord pouch<option>Lava titan pouch<option>Macaw pouch<option>Magpie pouch<option>Mithril minotaur pouch<option>Moss titan pouch<option>Obsidian golem pouch<option>Pack yak pouch<option>Phoenix pouch<option>Praying mantis pouch<option>Pyre lord pouch<option>Ravenous locust pouch<option>Rune minotaur pouch<option>Smoke devil pouch<option>Spirit cobra pouch<option>Spirit cockatrice pouch<option>Spirit coraxatrice pouch<option>Spirit dagannoth pouch<option>Spirit graahk pouch<option>Spirit guthatrice pouch<option>Spirit jelly pouch<option>Spirit kalphite pouch<option>Spirit kyatt pouch<option>Spirit larupia pouch<option>Spirit mosquito pouch<option>Spirit pengatrice pouch<option>Spirit saratrice pouch<option>Spirit scorpion pouch<option>Spirit spider pouch<option>Spirit terror bird pouch<option>Spirit tz-kih pouch<option>Spirit vulatrice pouch<option>Spirit wolf pouch<option>Spirit zamatrice pouch<option>Steel minotaur pouch<option>Steel titan pouch<option>Stranger plant pouch<option>Swamp titan pouch<option>Talon beast pouch<option>Thorny snail pouch<option>Unicorn stallion pouch<option>Vampire bat pouch<option>Void ravanger pouch<option>Void shifter pouch<option>Void spinner pouch<option>Void torcher pouch<option>War tortoise pouch<option>Wolpertinger pouch</select></center></td><td width=\"135\"></b></center></td></tr>";
		html += "The Ultimate Summoning Experience ";
		html += "</body>\n";
		html += "</html\n";
		return (html);

	}

	// What to do on Start
	@SuppressWarnings("deprecation")
	public boolean onStart(Map<String, String> args) {
		Bot.getEventManager().addListener(PaintListener.class, this);
		Bot.getEventManager().addListener(ServerMessageListener.class, this);
		if (args.get("scnditem") != null) {
			Item2ID = Integer.parseInt(args.get("2ndItemID"));
		}

		if (args.get("summonsort").equals("Pouch")) {
			summoningpouch = true;
		} else {
			if (args.get("summonsort").equals("Scrolls")) {
				summoningscrolls = true;
			}
		}

		if (args.get("pouch").equals("Abyssal lurker pouch")) {
			x = Integer.parseInt(pouches[1].split(":")[1]);
			y = Integer.parseInt(pouches[1].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[1].split(":")[3]);
		}
		if (args.get("pouch").equals("Abyssal parasite pouch")) {
			x = Integer.parseInt(pouches[2].split(":")[1]);
			y = Integer.parseInt(pouches[2].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[2].split(":")[3]);
		}
		if (args.get("pouch").equals("Abyssal titan pouch")) {
			x = Integer.parseInt(pouches[3].split(":")[1]);
			y = Integer.parseInt(pouches[3].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[3].split(":")[3]);
		}
		if (args.get("pouch").equals("Adamant minotaur pouch")) {
			x = Integer.parseInt(pouches[4].split(":")[1]);
			y = Integer.parseInt(pouches[4].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[4].split(":")[3]);
		}
		if (args.get("pouch").equals("Albino rat pouch")) {
			x = Integer.parseInt(pouches[5].split(":")[1]);
			y = Integer.parseInt(pouches[5].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[5].split(":")[3]);
		}
		if (args.get("pouch").equals("Arctic bear pouch")) {
			x = Integer.parseInt(pouches[6].split(":")[1]);
			y = Integer.parseInt(pouches[6].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[6].split(":")[3]);
		}
		if (args.get("pouch").equals("Barker toad pouch")) {
			x = Integer.parseInt(pouches[7].split(":")[1]);
			y = Integer.parseInt(pouches[7].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[7].split(":")[3]);
		}
		if (args.get("pouch").equals("Beaver pouch")) {
			x = Integer.parseInt(pouches[8].split(":")[1]);
			y = Integer.parseInt(pouches[8].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[8].split(":")[3]);
		}
		if (args.get("pouch").equals("Bloated leech pouch")) {
			x = Integer.parseInt(pouches[9].split(":")[1]);
			y = Integer.parseInt(pouches[9].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[9].split(":")[3]);
		}
		if (args.get("pouch").equals("Bronze minotaur pouch")) {
			x = Integer.parseInt(pouches[10].split(":")[1]);
			y = Integer.parseInt(pouches[10].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[10].split(":")[3]);
		}
		if (args.get("pouch").equals("Bull ant pouch")) {
			x = Integer.parseInt(pouches[11].split(":")[1]);
			y = Integer.parseInt(pouches[11].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[11].split(":")[3]);
		}
		if (args.get("pouch").equals("Bunyip pouch")) {
			x = Integer.parseInt(pouches[12].split(":")[1]);
			y = Integer.parseInt(pouches[12].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[12].split(":")[3]);
		}
		if (args.get("pouch").equals("Compost mound pouch")) {
			x = Integer.parseInt(pouches[13].split(":")[1]);
			y = Integer.parseInt(pouches[13].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[13].split(":")[3]);
		}
		if (args.get("pouch").equals("Desert wyrm pouch")) {
			x = Integer.parseInt(pouches[14].split(":")[1]);
			y = Integer.parseInt(pouches[14].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[14].split(":")[3]);
		}
		if (args.get("pouch").equals("Dreadfowl pouch")) {
			x = Integer.parseInt(pouches[15].split(":")[1]);
			y = Integer.parseInt(pouches[15].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[15].split(":")[3]);
		}
		if (args.get("pouch").equals("Evil turnip pouch")) {
			x = Integer.parseInt(pouches[16].split(":")[1]);
			y = Integer.parseInt(pouches[16].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[16].split(":")[3]);
		}
		if (args.get("pouch").equals("Fire titan pouch")) {
			x = Integer.parseInt(pouches[17].split(":")[1]);
			y = Integer.parseInt(pouches[17].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[17].split(":")[3]);
		}
		if (args.get("pouch").equals("Forge regent pouch")) {
			x = Integer.parseInt(pouches[18].split(":")[1]);
			y = Integer.parseInt(pouches[18].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[18].split(":")[3]);
		}
		if (args.get("pouch").equals("Fruit bat pouch")) {
			x = Integer.parseInt(pouches[19].split(":")[1]);
			y = Integer.parseInt(pouches[19].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[19].split(":")[3]);
		}
		if (args.get("pouch").equals("Geyser titan pouch")) {
			x = Integer.parseInt(pouches[20].split(":")[1]);
			y = Integer.parseInt(pouches[20].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[20].split(":")[3]);
		}
		if (args.get("pouch").equals("Giant chin pouch")) {
			x = Integer.parseInt(pouches[21].split(":")[1]);
			y = Integer.parseInt(pouches[21].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[21].split(":")[3]);
		}
		if (args.get("pouch").equals("Giant ent pouch")) {
			x = Integer.parseInt(pouches[22].split(":")[1]);
			y = Integer.parseInt(pouches[22].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[22].split(":")[3]);
		}
		if (args.get("pouch").equals("Granite crab pouch")) {
			x = Integer.parseInt(pouches[23].split(":")[1]);
			y = Integer.parseInt(pouches[23].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[23].split(":")[3]);
		}
		if (args.get("pouch").equals("Granite lobster pouch")) {
			x = Integer.parseInt(pouches[24].split(":")[1]);
			y = Integer.parseInt(pouches[24].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[24].split(":")[3]);
		}
		if (args.get("pouch").equals("Honey badger pouch")) {
			x = Integer.parseInt(pouches[25].split(":")[1]);
			y = Integer.parseInt(pouches[25].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[25].split(":")[3]);
		}
		if (args.get("pouch").equals("Hydra pouch")) {
			x = Integer.parseInt(pouches[26].split(":")[1]);
			y = Integer.parseInt(pouches[26].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[26].split(":")[3]);
		}
		if (args.get("pouch").equals("Ibis pouch")) {
			x = Integer.parseInt(pouches[27].split(":")[1]);
			y = Integer.parseInt(pouches[27].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[27].split(":")[3]);
		}
		if (args.get("pouch").equals("Ice titan pouch")) {
			x = Integer.parseInt(pouches[28].split(":")[1]);
			y = Integer.parseInt(pouches[28].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[28].split(":")[3]);
		}
		if (args.get("pouch").equals("Iron minotaur pouch")) {
			x = Integer.parseInt(pouches[29].split(":")[1]);
			y = Integer.parseInt(pouches[29].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[29].split(":")[3]);
		}
		if (args.get("pouch").equals("Iron titan pouch")) {
			x = Integer.parseInt(pouches[30].split(":")[1]);
			y = Integer.parseInt(pouches[30].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[30].split(":")[3]);
		}
		if (args.get("pouch").equals("Karamthulhu overlord pouch")) {
			x = Integer.parseInt(pouches[31].split(":")[1]);
			y = Integer.parseInt(pouches[31].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[31].split(":")[3]);
		}
		if (args.get("pouch").equals("Lava titan pouch")) {
			x = Integer.parseInt(pouches[32].split(":")[1]);
			y = Integer.parseInt(pouches[32].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[32].split(":")[3]);
		}
		if (args.get("pouch").equals("Macaw pouch")) {
			x = Integer.parseInt(pouches[33].split(":")[1]);
			y = Integer.parseInt(pouches[33].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[33].split(":")[3]);
		}
		if (args.get("pouch").equals("Magpie pouch")) {
			x = Integer.parseInt(pouches[34].split(":")[1]);
			y = Integer.parseInt(pouches[34].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[34].split(":")[3]);
		}
		if (args.get("pouch").equals("Mithril minotaur pouch")) {
			x = Integer.parseInt(pouches[35].split(":")[1]);
			y = Integer.parseInt(pouches[35].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[35].split(":")[3]);
		}
		if (args.get("pouch").equals("Moss titan pouch")) {
			x = Integer.parseInt(pouches[36].split(":")[1]);
			y = Integer.parseInt(pouches[36].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[36].split(":")[3]);
		}
		if (args.get("pouch").equals("Obsidian golem pouch")) {
			x = Integer.parseInt(pouches[37].split(":")[1]);
			y = Integer.parseInt(pouches[37].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[37].split(":")[3]);
		}
		if (args.get("pouch").equals("Pack yak pouch")) {
			x = Integer.parseInt(pouches[38].split(":")[1]);
			y = Integer.parseInt(pouches[38].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[38].split(":")[3]);
		}
		if (args.get("pouch").equals("Phoenix pouch")) {
			x = Integer.parseInt(pouches[39].split(":")[1]);
			y = Integer.parseInt(pouches[39].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[39].split(":")[3]);
		}
		if (args.get("pouch").equals("Praying mantis pouch")) {
			x = Integer.parseInt(pouches[40].split(":")[1]);
			y = Integer.parseInt(pouches[40].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[40].split(":")[3]);
		}
		if (args.get("pouch").equals("Pyre lord pouch")) {
			x = Integer.parseInt(pouches[41].split(":")[1]);
			y = Integer.parseInt(pouches[41].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[41].split(":")[3]);
		}
		if (args.get("pouch").equals("Ravenous locust pouch")) {
			x = Integer.parseInt(pouches[42].split(":")[1]);
			y = Integer.parseInt(pouches[42].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[42].split(":")[3]);
		}
		if (args.get("pouch").equals("Rune minotaur pouch")) {
			x = Integer.parseInt(pouches[43].split(":")[1]);
			y = Integer.parseInt(pouches[43].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[43].split(":")[3]);
		}
		if (args.get("pouch").equals("Smoke devil pouch")) {
			x = Integer.parseInt(pouches[44].split(":")[1]);
			y = Integer.parseInt(pouches[44].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[44].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit cobra pouch")) {
			x = Integer.parseInt(pouches[45].split(":")[1]);
			y = Integer.parseInt(pouches[45].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[45].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit cockatrice pouch")) {
			x = Integer.parseInt(pouches[46].split(":")[1]);
			y = Integer.parseInt(pouches[46].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[46].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit coraxatrice pouch")) {
			x = Integer.parseInt(pouches[47].split(":")[1]);
			y = Integer.parseInt(pouches[47].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[47].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit dagannoth pouch")) {
			x = Integer.parseInt(pouches[48].split(":")[1]);
			y = Integer.parseInt(pouches[48].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[48].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit graahk pouch")) {
			x = Integer.parseInt(pouches[49].split(":")[1]);
			y = Integer.parseInt(pouches[49].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[49].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit guthatrice pouch")) {
			x = Integer.parseInt(pouches[50].split(":")[1]);
			y = Integer.parseInt(pouches[50].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[50].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit jelly pouch")) {
			x = Integer.parseInt(pouches[51].split(":")[1]);
			y = Integer.parseInt(pouches[51].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[51].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit kalphite pouch")) {
			x = Integer.parseInt(pouches[52].split(":")[1]);
			y = Integer.parseInt(pouches[52].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[52].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit kyatt pouch")) {
			x = Integer.parseInt(pouches[53].split(":")[1]);
			y = Integer.parseInt(pouches[53].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[53].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit larupia pouch")) {
			x = Integer.parseInt(pouches[54].split(":")[1]);
			y = Integer.parseInt(pouches[54].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[54].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit mosquito pouch")) {
			x = Integer.parseInt(pouches[55].split(":")[1]);
			y = Integer.parseInt(pouches[55].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[55].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit pengatrice pouch")) {
			x = Integer.parseInt(pouches[56].split(":")[1]);
			y = Integer.parseInt(pouches[56].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[56].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit saratrice pouch")) {
			x = Integer.parseInt(pouches[57].split(":")[1]);
			y = Integer.parseInt(pouches[57].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[57].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit scorpion pouch")) {
			x = Integer.parseInt(pouches[58].split(":")[1]);
			y = Integer.parseInt(pouches[58].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[58].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit spider pouch")) {
			x = Integer.parseInt(pouches[59].split(":")[1]);
			y = Integer.parseInt(pouches[59].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[59].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit terror bird pouch")) {
			x = Integer.parseInt(pouches[60].split(":")[1]);
			y = Integer.parseInt(pouches[60].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[60].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit tz-kih pouch")) {
			x = Integer.parseInt(pouches[61].split(":")[1]);
			y = Integer.parseInt(pouches[61].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[61].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit vulatrice pouch")) {
			x = Integer.parseInt(pouches[62].split(":")[1]);
			y = Integer.parseInt(pouches[62].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[62].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit wolf pouch")) {
			x = Integer.parseInt(pouches[63].split(":")[1]);
			y = Integer.parseInt(pouches[63].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[63].split(":")[3]);
		}
		if (args.get("pouch").equals("Spirit zamatrice pouch")) {
			x = Integer.parseInt(pouches[64].split(":")[1]);
			y = Integer.parseInt(pouches[64].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[64].split(":")[3]);
		}
		if (args.get("pouch").equals("Steel minotaur pouch")) {
			x = Integer.parseInt(pouches[65].split(":")[1]);
			y = Integer.parseInt(pouches[65].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[65].split(":")[3]);
		}
		if (args.get("pouch").equals("Steel titan pouch")) {
			x = Integer.parseInt(pouches[66].split(":")[1]);
			y = Integer.parseInt(pouches[66].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[66].split(":")[3]);
		}
		if (args.get("pouch").equals("Stranger plant pouch")) {
			x = Integer.parseInt(pouches[67].split(":")[1]);
			y = Integer.parseInt(pouches[67].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[67].split(":")[3]);
		}
		if (args.get("pouch").equals("Swamp titan pouch")) {
			x = Integer.parseInt(pouches[68].split(":")[1]);
			y = Integer.parseInt(pouches[68].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[68].split(":")[3]);
		}
		if (args.get("pouch").equals("Talon beast pouch")) {
			x = Integer.parseInt(pouches[69].split(":")[1]);
			y = Integer.parseInt(pouches[69].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[69].split(":")[3]);
		}
		if (args.get("pouch").equals("Thorny snail pouch")) {
			x = Integer.parseInt(pouches[70].split(":")[1]);
			y = Integer.parseInt(pouches[70].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[70].split(":")[3]);
		}
		if (args.get("pouch").equals("Unicorn stallion pouch")) {
			x = Integer.parseInt(pouches[71].split(":")[1]);
			y = Integer.parseInt(pouches[71].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[71].split(":")[3]);
		}
		if (args.get("pouch").equals("Vampire bat pouch")) {
			x = Integer.parseInt(pouches[72].split(":")[1]);
			y = Integer.parseInt(pouches[72].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[72].split(":")[3]);
		}
		if (args.get("pouch").equals("Void ravanger pouch")) {
			x = Integer.parseInt(pouches[73].split(":")[1]);
			y = Integer.parseInt(pouches[73].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[73].split(":")[3]);
		}
		if (args.get("pouch").equals("Void shifter pouch")) {
			x = Integer.parseInt(pouches[74].split(":")[1]);
			y = Integer.parseInt(pouches[74].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[74].split(":")[3]);
		}
		if (args.get("pouch").equals("Void spinner pouch")) {
			x = Integer.parseInt(pouches[75].split(":")[1]);
			y = Integer.parseInt(pouches[75].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[75].split(":")[3]);
		}
		if (args.get("pouch").equals("Void torcher pouch")) {
			x = Integer.parseInt(pouches[76].split(":")[1]);
			y = Integer.parseInt(pouches[76].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[76].split(":")[3]);
		}
		if (args.get("pouch").equals("War tortoise pouch")) {
			x = Integer.parseInt(pouches[77].split(":")[1]);
			y = Integer.parseInt(pouches[77].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[77].split(":")[3]);
		}
		if (args.get("pouch").equals("Wolpertinger pouch")) {
			x = Integer.parseInt(pouches[78].split(":")[1]);
			y = Integer.parseInt(pouches[78].split(":")[2]);
			whatScroll = Integer.parseInt(pouches[78].split(":")[3]);
		}
		return true;
	}

	public void checkScroll() {
		int scrollx = 486;
		int scrolly = 0;
		if (whatScroll == 1) {
			scrolly = 144;
		} else if (whatScroll == 2) {
			scrolly = 189;
		} else if (whatScroll == 3) {
			scrolly = 234;
		} else if (whatScroll == 4) {
			scrolly = 280;
		}
		clickMouse(scrollx + random(-1, 1), scrolly + random(-1, 1), true);
	}

	// Infuses the pouch/scroll
	public void inFuse() {
		if (summoningpouch == true) {
			checkScroll();
			clickMouse(x + random(-5, 5), y + random(-5, 5), false);
			atMenu("All");
			atInterface(669, 7, "Close");
		} else if (summoningscrolls == true) {
			atInterface(669, 19, "Transform");
			checkScroll();
			clickMouse(x + random(-5, 5), y + random(-5, 5), false);
			atMenu("All");
			atInterface(669, 7, "Close");
		}
	}

	// Checks if player is in a Area
	public boolean isInArea(int maxX, int minY, int minX, int maxY) {
		int x = getMyPlayer().getLocation().getX();
		int y = getMyPlayer().getLocation().getY();
		if (x >= minX && x <= maxX && y >= minY && y <= maxY) {
			return true;
		}
		return true;
	}

	public enum Action {
		ATTACK_AND_DRINK, AFK_AND_DRINK, GET_AGGRESIVEAGAIN, GET_BACK
	};

	// Gets action to do
	public Action getProcess() {
		int pouchID = 12155;
		int shard = 12183;
		try {
			if (summoningpouch == true) {
				if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210, 5340,
						2203, 5349))
						&& (!inventoryContains(shard, item1, item2, pouchID))) {
					process = "Walking to Bank";
				} else if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210,
						5340, 2203, 5349))
						&& inventoryContains(shard, item1, item2, pouchID)) {
					process = "Fusing";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& inventoryContains(shard, item1, item2, pouchID)) {
					process = "Walking to Place";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& !inventoryContains(shard, item1, item2, pouchID)) {
					process = "Banking Pouches";
				} else if (isInArea(2973, 3374, 2957, 3388)
						&& !inventoryContains(item2)) {
					process = "Walking from Tele";
				} else if (isInArea(2210, 5340, 2203, 5349)
						&& !inventoryContains(item2)) {
					process = "Teleporting";
				}
			} else if (summoningscrolls == true) {
				if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210, 5340,
						2203, 5349))
						&& !inventoryContains(item2)) {
					process = "Walking to Bank";
				} else if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210,
						5340, 2203, 5349))
						&& inventoryContains(item2)) {
					process = "Fusing";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& inventoryContains(item2)) {
					process = "Walking to Place";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& !inventoryContains(item2)) {
					process = "Banking Scrolls";
				} else if (isInArea(2973, 3374, 2957, 3388)
						&& !inventoryContains(item2)) {
					process = "Walking from Tele";
				} else if (isInArea(2210, 5340, 2203, 5349)
						&& !inventoryContains(item2)) {
					process = "Teleporting";
				}
			}
		} catch (Exception e) {
		}
		return null;

	}

	// Checks if we are in an area
	public boolean atArea(RSArea area) {
		if (area.contains(getMyPlayer().getLocation())) {
			return true;
		} else {
			return false;
		}
	}

	public void checkprocess() {
		int pouchID = 12155;
		int shard = 12183;
		try {
			if (summoningpouch == true) {
				if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210, 5340,
						2203, 5349))
						&& (!inventoryContains(shard, item1, item2, pouchID))) {
					process = "Walking to Bank";
				} else if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210,
						5340, 2203, 5349))
						&& inventoryContains(shard, item1, item2, pouchID)) {
					process = "Fusing";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& inventoryContains(shard, item1, item2, pouchID)) {
					process = "Walking to Place";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& !inventoryContains(shard, item1, item2, pouchID)) {
					process = "Banking Pouches";
				} else if (isInArea(2973, 3374, 2957, 3388)
						&& !inventoryContains(item2)) {
					process = "Walking from Tele";
				} else if (isInArea(2210, 5340, 2203, 5349)
						&& !inventoryContains(item2)) {
					process = "Teleporting";
				}
			} else if (summoningscrolls == true) {
				if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210, 5340,
						2203, 5349))
						&& !inventoryContains(item2)) {
					process = "Walking to Bank";
				} else if ((isInArea(2927, 3440, 2923, 3446) || isInArea(2210,
						5340, 2203, 5349))
						&& inventoryContains(item2)) {
					process = "Fusing";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& inventoryContains(item2)) {
					process = "Walking to Place";
				} else if (isInArea(2949, 3368, 2943, 3373)
						&& !inventoryContains(item2)) {
					process = "Banking Scrolls";
				} else if (isInArea(2973, 3374, 2957, 3388)
						&& !inventoryContains(item2)) {
					process = "Walking from Tele";
				} else if (isInArea(2210, 5340, 2203, 5349)
						&& !inventoryContains(item2)) {
					process = "Teleporting";
				}
			}
		} catch (Exception e) {
		}

	}

	// What to do on Finish
	public void onFinish() {
		Bot.getEventManager().removeListener(PaintListener.class, this);
		Bot.getEventManager().removeListener(ServerMessageListener.class, this);
		log("Finished");
		return;
	}

	// If needs to bank
	public boolean needToBank() {
		return getInventoryCount(item1) < 1;
	}

	// At the Obelisk
	public boolean atObelisk() {
		return !getMyPlayer().isMoving() && distanceTo(obeliskSpot) <= 7;
	}

	// At the store of Summoning
	public boolean atStore() {
		return !getMyPlayer().isMoving() && distanceTo(shop) <= 5;
	}

	// At bank
	public boolean atBank() {
		RSObject bankBooth = getNearestObjectByID(booth);
		return !getMyPlayer().isMoving() && distanceTo(bankBooth) <= 5;
	}

	// Handles the bank
	public boolean handleBank() {
		RSObject bankBooth = getNearestObjectByID(booth);
		if (bankBooth == null) {
			setCameraRotation(0);
			return false;
		}

		if (bank.isOpen()) {
			if (bank.getCount(item2) == 0 && !inventoryContains(item2)) {
				log("You ran out of items");
				bank.close();
				stopAllScripts();
			} else {
				if (bank.getCount(pouch) == 0 && !inventoryContains(pouch)) {
					log("You ran out of pouches");
					bank.close();
					stopAllScripts();
				} else {
					if (bank.getCount(shards) == 0
							&& !inventoryContains(shards)) {
						log("You ran out of shards");
						bank.close();
						stopAllScripts();
					} else {
						if (bank.getCount(item1) == 0
								&& !inventoryContains(item1)) {
							log("You ran out of charms");
							bank.close();
							stopAllScripts();
						} else {
							if (bank.getCount(item2) == 0
									&& !inventoryContains(item2)) {
								log("You ran out of items");
								bank.close();
								stopAllScripts();
							}
						}
					}
				}
				wait(100);
				bank.close();
			}
		}
		return true;
	}

	// At right gate
	public boolean atGate() {
		return !getMyPlayer().isMoving() && distanceTo(RGate) <= 3;
	}

	// Sets running
	public void run() {
		int runEnergy = random(25, 40);
		if (!isRunning()) {
			if (getEnergy() >= runEnergy) {
				setRun(true);
			}
		}
	}

	// The loop where it ALL happens
	public int loop() {
		run();

		if (needToBank()) {
			if (atBank()) {
				handleBank();
				return random(800, 1000);
			} else {
				if (!atBank()) {
					atInventoryItem(teleTab, "Break");
					wait(random(500, 1200));
					walkPath(toBank, true);
					return random(800, 1000);
				}
			}
		}

		if (atGate()) {
			RSObject gateC = getNearestObjectByID(gateClosed);
			RSObject gateO = getNearestObjectByID(gateOpened);
			if (gateO != null) {
				walkPath(toStore, true);
			} else {
				if (gateC != null) {
					atObject(gateO, "Open");
					waitForAnim(2000);
					walkPath(toStore, true);
				}
			}
			return random(800, 1000);
		}

		if (atStore()) {
			RSObject ladderDowny = getNearestObjectByID(ladderDown);
			if (ladderDowny != null) {
				atObject(ladderDowny, "Climb-Down");
				return random(800, 1000);
			}

			if (atObelisk()) {
				RSObject oblisky = getNearestObjectByID(oblisk);
				if (oblisky != null) {
					atObject(oblisky, "Infuse-Pouch");
					// Interface stuff
					return random(500, 800);
				}
			}
		}
		return random(500, 800);
	}

	// Paint of Script, Credits to Noobielul
	public void onRepaint(Graphics g) {
		if (isLoggedIn()) {
			if (startTime == 0)
				startTime = System.currentTimeMillis();

			if (startLvl <= 0 || startExp <= 0) {
				startLvl = skills.getCurrentSkillLevel(STAT_SUMMONING);
				startExp = skills.getCurrentSkillExp(STAT_SUMMONING);
			}

			long millis = System.currentTimeMillis() - startTime;
			long hours = millis / (1000 * 60 * 60);
			millis -= hours * (1000 * 60 * 60);
			long minutes = millis / (1000 * 60);
			millis -= minutes * (1000 * 60);
			long seconds = millis / 1000;

			int x = 0;
			int y = 20;
			g.setColor(new Color(0, 0, 0, 175));
			g.fillRoundRect(0, 20, 220, 120, 10, 10);
			g.fillRect(4, 319, 502, 17);
			g.setFont(new Font("Papyrus", Font.BOLD, 11));
			g.setColor(Color.YELLOW);
			g.drawString("UltimateCrabsPwn3r - V" + getVersion(), x + 10,
					y += 15);
			g.setColor(Color.ORANGE);
			g.drawString("Bussy for " + hours + ":" + minutes + ":" + seconds,
					x + 10, y += 15);
			g
					.drawString("Current " + skill + " level : "
							+ skills.getRealSkillLevel(STAT_SUMMONING), x + 10,
							y += 15);
			g.drawString("Gained " + skill + " levels : " + lvls / 2, x + 10,
					y += 15);
			g.drawString("Gained " + skill + " exp : "
					+ (skills.getCurrentSkillExp(STAT_SUMMONING) - startExp),
					x + 10, y += 15);
			g
					.drawString(
							"Exp/hour : "
									+ (int) ((skills
											.getCurrentSkillExp(STAT_SUMMONING) - startExp) * (3600000D / (((double) System
											.currentTimeMillis() - (double) startTime)))),
							x + 10, y += 15);
			g.drawImage(UltimateSeries, 55, 360, null);
			g.setColor(Color.ORANGE);
			g.fillRect(5, 320,
					5 * skills.getPercentToNextLevel(STAT_SUMMONING), 15);
			g.setColor(Color.WHITE);
			g.drawString(skills.getPercentToNextLevel(STAT_SUMMONING) + "%",
					250, 331);
		}
	}

	// ServerMessage thingys
	public void serverMessageRecieved(ServerMessageEvent arg0) {
		String summMessage = arg0.getMessage();
		if (summMessage.contains("You've just advanced")) {
			lvls++;
			clickContinue();
		}
	}

	// Method of walking
	private void walkPath(RSTile[] path, boolean reverse) {
		if (!reverse) {
			if (!getMyPlayer().isMoving()
					|| distanceTo(getDestination()) <= random(4, 7)) {
				walkPathMM(randomizePath(path, 2, 2), 17);
				setCameraRotation(0);

				return;
			}
		} else {
			if (!getMyPlayer().isMoving()
					|| distanceTo(getDestination()) <= random(4, 7)) {
				walkPathMM(randomizePath(reversePath(path), 2, 2), 17);
				setCameraRotation(0);
				return;
			}
		}
	}
}
